<template>
  <div>
    <ul>
      <li v-for="(dog,index) in dogs" :key="index">{{dog}}</li>
    </ul>
    <span>一共有{{dogs.length}}只狗</span>
    <hr>
  </div>
</template>

<script setup>
import { ref } from 'vue';
let dog = ref(4)
const dogs = ["dog1",'dog1','dog2','dog3']
</script>

<style scoped>

</style>